<?php
require('sanitize.inc.php');
$page = sanitize($_GET['page'], PARANOID);

switch ($page){
    case "About" : $page = file_get_contents("mobile/Credits-Screen.html"); break;
    case "LiveData" : $page = file_get_contents("mobile/LineChart.html"); break;
    default:
        include ("weatherClass.php");
        $weather = new weatherClass();
        $x = $weather->fetchForecast();
        $page = file_get_contents("mobile/Home.html");
        $page = str_replace("[--DESCRIPTION--]",$x[0],$page);
        $page = str_replace("[--IMG--]",$x[1],$page);
}
echo($page);
exit;

